import React,{useState} from 'react'

export default function App() {
  const [count , setCount]= useState(0)

  const setCountAdd = ()=>{
    setCount(count + 1)
  }

  return (
    <div>
      <h1>点击下面按钮。累加数字{count}</h1>
      <button onClick = {setCountAdd}>点击累加</button>
    </div>
  )
}
